char wasd;  // position
int wled = 13; //sets pin
int aled = 12;
int sled = 11;
int dled = 10;
int waiting = 2;

void setup(){
pinMode(wled, OUTPUT);  //makes pin output
pinMode(aled, OUTPUT);
pinMode(dled, OUTPUT);
pinMode(sled, OUTPUT);
pinMode(waiting, OUTPUT);
Serial.begin(9600);
}

void loop(){
  if(Serial.available()){  //is serail connection ready
    wasd=Serial.read();  //the variable
  }
  if(wasd=='w'){
    Serial.print("Going Forward");
    digitalWrite(wled, HIGH);  //case for w led on all others off
    digitalWrite(sled, LOW);
    digitalWrite(aled, LOW);
    digitalWrite(dled, LOW);
  }
  else if(wasd=='s'){
    Serial.print("Going Backwards");
    digitalWrite(wled, LOW);
    digitalWrite(sled, HIGH);
    digitalWrite(aled, LOW);
    digitalWrite(dled, LOW);
  }
  else if(wasd=='a'){
    Serial.print("Going Left");
    digitalWrite(wled, LOW);
    digitalWrite(sled, LOW);
    digitalWrite(aled, HIGH);
    digitalWrite(dled, LOW);
  }
  else if(wasd=='d'){
    Serial.print("Going Right");
    Serial.print("Fuck Yea!!!");
    digitalWrite(wled, LOW);
    digitalWrite(sled, LOW);
    digitalWrite(aled, LOW);
    digitalWrite(dled, HIGH);
  }
  else{
    digitalWrite(waiting, HIGH);//blue blinky led
    delay(100);
    digitalWrite(waiting, LOW);
    delay(100);
  }
}
